<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>three.js-Creating text</title>
</head>
<body>
  <script src="./js/three.js"></script>
  <script async src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script>
  <div id="info">Description</div>
  <script>
    // 定义渲染器
    const renderer = new THREE.WebGLRenderer();
    renderer.setSize( window.innerWidth, window.innerHeight ); // 渲染器设置宽高
    document.body.appendChild( renderer.domElement ); // 添加页面canvas绘制

    const camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 500 ); // 定义透视相机
    camera.position.set( 0, 0, 100 );
    camera.lookAt( 0, 0, 0 );

    const scene = new THREE.Scene();
    scene.background = new THREE.Color( 0x000000 );
				scene.fog = new THREE.Fog( 0x000000, 250, 1400 );
        const manager = new THREE.LoadingManager();
        const loader = new FontLoader();
    
    let text = 'three.js';

    let fontParames = {
      font: font,
      size: 80,
      height: 5,
      curveSegments: 12,
      bevelEnabled: true,
      bevelThickness: 10,
      bevelSize: 8,
      bevelSegments: 5
    }
    const textGeo = new THREE.TextGeometry( text, fontParames );
    textGeo.computeBoundingBox();

    scene.add( textGeo );
    renderer.render( scene, camera );
  </script>

  <style>
    #info {
	position: absolute;
	top: 10px;
	width: 100%;
	text-align: center;
	z-index: 100;
	display:block;
}
  </style>
</body>
</html>